home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Format 1994 October
/
Macformat17.cdr
/
Shareware City
/
Developers
/
GAL ƒ
/
GAL examples
/
Max of 3
< prev
next >
Wrap
Text File
|
1994-07-11
|
468b
|
18 lines
; find the maximum of three numbers
begin_code
copy n=>r0 first number in loc n
compare n+2=>r0 second in loc n+1
jump:less_than first
copy n+2=>r0 larger of first 2 in r0
first compare n+4=>r0 third number in loc n+2
jump:less_than still
copy n+4=>r0 largest of all 3 in r0
still copy r0=>max
halt
end_code
begin_data
n constant:integer 15,2,67 3 data values
max variable:integer 1
end_data
end